package com.ext.aic.box;

import com.eyinfo.mpkv.MPLocalKV;

public class TripartiteLoginStatus {
    private static volatile TripartiteLoginStatus instance;

    public static TripartiteLoginStatus getInstance() {
        if (instance == null) {
            synchronized (TripartiteLoginStatus.class) {
                if (instance == null) {
                    instance = new TripartiteLoginStatus();
                }
            }
        }
        return instance;
    }

    private boolean loginPcWeChat = false;
    private String weChatPrePcLoginStatusKey = "8bf4ba19486e3b8e";

    public void setLoginPcWeChat(boolean loginPcWeChat) {
        this.loginPcWeChat = loginPcWeChat;
    }

    public boolean isLoginPcWeChat() {
        return loginPcWeChat;
    }

    public void saveWeChatPrePcLoginStatus(boolean loginPcWeChat) {
        MPLocalKV.getInstance().put(weChatPrePcLoginStatusKey, loginPcWeChat);
    }

    public boolean getWeChatPrePcLoginStatus() {
        return MPLocalKV.getInstance().getBoolean(weChatPrePcLoginStatusKey, false);
    }
}
